package com.lanqiao.companymanage.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanqiao.companymanage.entity.AssetInformation;
import com.lanqiao.companymanage.entity.Management;
import com.lanqiao.companymanage.service.CompanyOperateService;
import com.lanqiao.companymanage.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 何小棍
 * 公司经营查询
 */
@RestController
@RequestMapping("/companyOperate")
@Api(tags = "公司经营")
public class CompanyOperateController {

    @Autowired
    CompanyOperateService companyOperateService;

    /**
     * 公司经营分页查询
     * @param managementPage
     * @return
     */
    @GetMapping("/getCompanyOperatePage")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current", value = "当前页数,默认第一页"),
            @ApiImplicitParam(name = "size", value = "每页显示条数，默认 10")})
    @ApiOperation(value = "公司经营分页查询")
    public Result getCompanyOperatePage(Page<Management> managementPage){
        Page<Management> list =  companyOperateService.getCompanyOperatePage(managementPage);
        return Result.success(list);
    }
}
